CC = gcc
LIBS = -lpthread\
	/home/users/cse533/Stevens/unpv13e/libunp.a\

FLAGS = -g -O2

PROGS = client server ODR 
CFLAGS = ${FLAGS} -I/home/users/cse533/Stevens/unpv13e/lib

CLEANFILES = core core.* *.core *.o temp.* *.out typescript* \
		*.lc *.lh *.bsdi *.sparc *.uw
		
all:	${PROGS}

client:  client.o 
	${CC} ${CFLAGS} -o client client.o ${LIBS}
	
client.o: client.c
	${CC} ${CFLAGS} -c client.c 

server: server.o
	${CC} ${CFLAGS} -o server server.o ${LIBS} 	

server.o: server.c
	${CC} ${CFLAGS} -c server.c

ODR: ODR.o traverse.o
	${CC} ${CFLAGS} -o ODR ODR.o traverse.o ${LIBS}
		
ODR.o: ODR.c
	${CC} ${CFLAGS} -c ODR.c

traverse.o: traverse.c
	${CC} ${CFLAGS} -c traverse.c 

pfsender:  pfsender.o
		${CC} ${CFLAGS} -o $@ pfsender.o ${LIBS}	

rawRecv:  rawRecv.o
		${CC} ${CFLAGS} -o $@_${USERNAME} rawRecv.o ${LIBS}

rawSend:  rawSend.o
		${CC} ${CFLAGS} -o $@_${USERNAME} rawSend.o ${LIBS}

get_hw_addrs.o: get_hw_addrs.c
	${CC} ${FLAGS} -c get_hw_addrs.c

prhwaddrs.o: prhwaddrs.c
	${CC} ${FLAGS} -c prhwaddrs.c 		

clean:
		rm -f ${PROGS} ${CLEANFILES}
